# -*- encoding:utf-8 -*-
import sys, os


class TestCaseNumIMPL:
    def __init__(self):
        pass

    def getValue(self):
        testno = open("inputdata\\testcasenum.txt", "r")
        strno = testno.read()
        testno.close()
        return strno

    def addOneToFile(self):
        strNOcase = self.getValue()
        strP1 = strNOcase[0:2]
        strP2 = strNOcase[2:len(strNOcase)]
        lastNO = strP1 + str(int(strP2) + 1)

        wrf = open("inputdata\\testcasenum.txt", "w")
        wrf.write(lastNO)
        wrf.close()

    def setValue(self, lastNO=None):
        wrf = open("inputdata\\testcasenum.txt", "w")
        if lastNO is not None:
            wrf.write(lastNO)
        else:
            wrf.write("TC1")
        wrf.close()
